package com.example.boot.service.impl;

import com.example.boot.mapper.UsersMapper;
import com.example.boot.pojo.Users;
import com.example.boot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class UserServiceImpl implements UserService {

    @Autowired
    private UsersMapper usersMapper;

    @Override
    public void addUsers(Users users) {
        usersMapper.addUsers(users);
    }

    @Override
    public List<Users> getAll() {
        return usersMapper.getAll();
    }
}
